package com.haohope.framework.autoconfigure;

import java.io.File;

import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;

import com.haohope.framework.FrameworkConstant;

public class FrameworkWebServerFactoryCustomizer implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>{
	@Override
	public void customize(ConfigurableServletWebServerFactory factory) {
		factory.setPort(FrameworkConstant.SystemParam.getWebPort());
		factory.setDocumentRoot(new File(FrameworkConstant.SystemParam.getWebPath()));
	}
}
